<%@ include file="/html/bjp/recruitersprofile/init.jsp" %>

<%
	PortletURL url = renderResponse.createActionURL();
	url.setWindowState(WindowState.NORMAL);
	url.setParameter("struts_action", "/bjp/recruitersprofile/process");
	url.setParameter(Constants.CMD, Constants.ADD);
	
	Profile profile = null;
	profile = (Profile) request.getAttribute("PROFILE");
	
	String add_url = PortletURLUtil.getCurrent(renderRequest, renderResponse).toString();
	ps.setAttribute("add_url",add_url);
	
	String width = "200px";
%>
<script>
function update(url) {
	
}
</script>
<form name="fm" action=<%= url.toString() %> method="POST">
	<table width="100%">
		<tr class="portlet-section-body results-row">
			<td width="30%">
				Incharge Name:
			</td>
			<td width="30%">
				<input type="text" name="inchargeName" value="<%= (Validator.isNull(profile))? "": profile.getInchargeName() %>" style='width:<%= width %>'/>
			</td>
			<td width="20%">
			</td>
		</tr>
		<tr class="portlet-section-body results-row alt">
			<td width="30%">
				Mobile:
			</td>
			<td width="30%">
				<input type="text" name="mobile" value="<%= (Validator.isNull(profile))? "": profile.getMobile() %>" style='width:<%= width %>' />
			</td>
			<td width="20%">
			</td>
		</tr>
		<tr class="portlet-section-body results-row">
			<td width="30%">
				Address:
			</td>
			<td width="30%">
				<input type="text" name="address" value="<%= (Validator.isNull(profile))? "": profile.getAddress() %>" style='width:<%= width %>' />
			</td>
			<td width="20%">
			</td>
		</tr>
		<tr class="portlet-section-body results-row alt">
			<td width="30%">
				Email:
			</td>
			<td width="30%">
				<input type="text" name="emailAddress" value="<%= (Validator.isNull(profile))? "": profile.getEmailAddress() %>" style='width:<%= width %>' />
			</td>
			<td width="20%">
			</td>
		</tr>
		<tr class="portlet-section-body results-row">
			<td colspan="3" align="center">
				<% if (Validator.isNull(profile)) { %>
					<input type="submit" value="save"/>
				<% } else { 
						url.setParameter(Constants.CMD, Constants.EDIT); %>
					<input type="submit" value="Update" />
				<% } %>
			</td>
		</tr>
	</table>
</form>
